package com.zoke.daycarpool.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zoke.daycarpool.R;
import com.zoke.daycarpool.domain.MinePubBeen;
import com.zoke.support.base.BaseObjectListAdapter;
import com.zoke.support.utils.ViewHolder;

/**
 * 频道列表
 * 
 * @author jack
 * 
 */
public class MyPublishAdapter extends BaseObjectListAdapter {

	public MyPublishAdapter(Context context, List<? extends Object> datas) {
		super(context, datas);
	}

	@Override
	public View getItemView(int position, View convertView, ViewGroup parent) {
		convertView = getConvertView(convertView,
				R.layout.listview_mypublist_item);
		MinePubBeen mb = (MinePubBeen) mDatas.get(position);
		RelativeLayout itemContainer = ViewHolder.get(convertView,
				R.id.item_container);
		TextView mNameTv = ViewHolder.get(convertView, R.id.my_pub_nameTv);
		mNameTv.setText("" + mb.getDesc());
		TextView mNumTv = ViewHolder.get(convertView, R.id._carpool_pnum_tv);
		mNumTv.setText("" + mb.getPubDate());
		itemContainer.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
			}
		});
		return convertView;
	}

}
